package lumis.portal.principal.importprincipal;

import java.util.Date;

/**
 * Value object that holds the config values of a import
 * 
 *
 * @version $Revision: 13092 $ $Date: 2011-05-28 18:19:06 -0300 (Sat, 28 May 2011) $
 * @since 4.0.8
 */
public class PrincipalWriterConfig
{
	public final static int ACTION_IGNORE = 0;
	public final static int ACTION_OVERWRITE = 1;
	public final static int ACTION_INSERT = 2;
	public final static int ACTION_DELETE_GROUP_DISABLE_USER = 3;

	private String id;
	private String origin;
	private String inputFile;
	private Date lastRun;
	private int ifExistsInDestination ;
	private int ifDoesNotExistInDestination;
	private int ifDoesNotExistInSource;
	private boolean schedule;

	/**
	 * Get the option of automatic execution.
	 * 
	 * @return whether the automatic execution is enabled.
	 * @since 6.0.0
	 */
	public boolean isSchedule()
	{
		return schedule;
	}

	/**
	 * Set the option of automatic execution.
	 * 
	 * @param schedule whether the automatic execution is enabled.
	 * @since 6.0.0
	 */
	public void setSchedule(boolean schedule)
	{
		this.schedule = schedule;
	}

	/**
	 * Get id
	 * @return
	 * @since 4.0.8
	 */
	public String getId()
	{
		return id;
	}
	
	/**
	 * Set id
	 * @param id
	 * @since 4.0.8
	 */
	public void setId(String id)
	{
		this.id = id;
	}
	
	/**
	 * Get the option of execution when the user or group doesn't exists in destination
	 * @return
	 * @since 4.0.8
	 */
	public int getIfDoesNotExistInDestination()
	{
		return ifDoesNotExistInDestination;
	}
	
	/**
	 * Set the option of execution when the user or group doesn't exists in destination
	 * @param ifDoesNotExistInDestination
	 * @since 4.0.8
	 */
	public void setIfDoesNotExistInDestination(int ifDoesNotExistInDestination)
	{
		this.ifDoesNotExistInDestination = ifDoesNotExistInDestination;
	}
	
	/**
	 * Get the option of execution when the user or group doesn't exists in source.
	 * @return
	 * @since 4.0.8
	 */
	public int getIfDoesNotExistInSource()
	{
		return ifDoesNotExistInSource;
	}
	
	/**
	 * Set the option of execution when the user or group doesn't exists in source.
	 * @param ifDoesNotExistInSource
	 * @since 4.0.8
	 */
	public void setIfDoesNotExistInSource(int ifDoesNotExistInSource)
	{
		this.ifDoesNotExistInSource = ifDoesNotExistInSource;
	}
	
	/**
	 * Get the option of execution when the user or group exists in destination.
	 * @return
	 * @since 4.0.8
	 */
	public int getIfExistsInDestination()
	{
		return ifExistsInDestination;
	}
	
	/**
	 * Set the option of execution when the user or group exists in destination.
	 * @param ifExistsInDestination
	 * @since 4.0.8
	 */
	public void setIfExistsInDestination(int ifExistsInDestination)
	{
		this.ifExistsInDestination = ifExistsInDestination;
	}
	
	/**
	 * Get input file path
	 * @return
	 * @since 4.0.8
	 */
	public String getInputFile()
	{
		return inputFile;
	}
	
	/**
	 * Set input file path
	 * @param inputFile
	 * @since 4.0.8
	 */
	public void setInputFile(String inputFile)
	{
		this.inputFile = inputFile;
	}
	
	/**
	 * Get date of last execution
	 * @return
	 * @since 4.0.8
	 */
	public Date getLastRun()
	{
		return lastRun;
	}
	
	/**
	 * Set date of last execution
	 * @param lastRun
	 * @since 4.0.8
	 */
	public void setLastRun(Date lastRun)
	{
		this.lastRun = lastRun;
	}
	
	/**
	 * Get origin
	 * @return
	 * @since 4.0.8
	 */
	public String getOrigin()
	{
		return origin;
	}
	
	/**
	 * Set origin
	 * @param origin
	 * @since 4.0.8
	 */
	public void setOrigin(String origin)
	{
		this.origin = origin;
	}
}
